package com.chat.service;

import com.chat.Local;
import com.chat.common.Message;
import com.chat.common.MessageType;
import com.chat.common.User;
import com.chat.view.FriendListData;
import com.chat.view.VerifyData;

import static com.chat.view.VerifyMessageController.ver;
import java.util.ArrayList;

/*
   该类用于提取未处理的验证消息
 */
public class GetVerifyMessage {
        public void getverifymeesage(){
                Message msg=new Message();
                User user=new User();
                user.setUsername(Local.user.getUsername());
                msg.setData(user);
                msg.setMesType(MessageType.MESSAGE_GET_VERIFY_MESSAGE);
                ClientConnectServerThread clientConnectServerThread=ManageClientConnectServerThread.getClientConnectServerThread(Local.user.getUsername());
                clientConnectServerThread.send(msg);
        }
        public void setverifymessage(ArrayList<User> a){
                for(int i=0;i<a.size();i++)
                {
                        ver.add(new VerifyData(a.get(i).getNickname(),a.get(i).getUsername(),"0"));
                }
        }
}
